﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/AdminMsaster.master" AutoEventWireup="true" CodeFile="ReaderInfoManage.aspx.cs" Inherits="Admin_ReaderInfoManage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    
         <script src="assets/js/jquery-1.10.2.js"></script>
    <!-- Bootstrap Js -->
    <script src="assets/js/bootstrap.min.js"></script>
    <!-- Metis Menu Js -->
    <script src="assets/js/jquery.metisMenu.js"></script>
    <!-- DATA TABLE SCRIPTS -->

    <script src="assets/js/TypeTables.js"></script>
    <script src="assets/js/dataTables/dataTables.bootstrap.js"></script>
    <script src="assets/js/model.js"></script>
    <!-- Custom Js -->
    <script src="assets/js/custom-scripts.js"></script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
      



    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:BooksManagerSystemConnectionString %>"></asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:BooksManagerSystemConnectionString %>" SelectCommand="SELECT [PublishCompanyID], [PublishCompanyName] FROM [Publish_company]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:BooksManagerSystemConnectionString %>" SelectCommand="SELECT [ReaderType], [TypeName] FROM [Reader_type]"></asp:SqlDataSource>
    <div id="page-wrapper">
        <div id="page-inner">
            <div class="row">
                <div class="col-md-12">
                    <h1 class="page-header">图书类别管理<small> 在这里您可以管理所有图书的类别</small>
                    </h1>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <!-- Advanced Tables -->
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h2>*读者信息目录</h2>
                        </div>
                        <hr />

                        <div class="panel-body">
                            <div class="panel-heading">
                            </div>
                            <div class="table-responsive">
                                <!-- 数据源开始 -->

                                <asp:GridView ID="mybookdata" class="mytablestyle table table-striped table-bordered table-hover" runat="server" DataSourceID="SqlDataSource1">
                                    <Columns>
                                        <asp:TemplateField HeaderText="选择">
                                            <ItemStyle HorizontalAlign="Center" />
                                            <ItemTemplate>
                                                <asp:CheckBox ID="CheckBox" CssClass="checkbox" OnCheckedChanged="flash_Click" runat="server" AutoPostBack="True"></asp:CheckBox>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                </asp:GridView>
                                <!-- 数据源结束 -->
                                <br />
                                <h3 style="float: left;">* 对读者信息的操作：</h3>

                                <button id="Cancel" class="btn btn-info" runat="server" style="float: right; margin-left: 13px;" data-toggle="modal" data-target="#myModal">添加读者</button>
                                &nbsp;&nbsp;
                                 <button id="change" class="btn btn-warning" runat="server" style="float: right; margin-left: 13px;" data-toggle="modal" data-target="#myModal2">修改信息</button>
                              
                                <asp:Button ID="delete" CssClass="btn btn-danger" Style="float: right; margin-left: 13px;" runat="server" Text="删除读者" OnClick="delete_Click" />

                                <asp:Button ID="flash" class="btn btn-success"  OnClick="flash_Click" runat="server" style="float: right; margin-left: 13px;" Text="查看详情" />



                                <script> window.onload = function asdasd() {
     $("#ContentPlaceHolder1_mybookdata tr:first").wrap("<thead></thead>");
     $("#ContentPlaceHolder1_mybookdata thead").insertBefore("#GriView1 tbody");
     $("#ContentPlaceHolder1_mybookdata").dataTable();
 }</script>
                            </div>


                        </div>


                        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:BooksManagerSystemConnectionString %>" SelectCommand="SELECT [AmerceTypeID], [AmerceName] FROM [Amerce_info]"></asp:SqlDataSource>





                        <!-- 按钮触发模态框 -->




                        <!-- 模态框（Modal） -->
                        <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                            <div class="modal-dialog">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                            &times;</button>
                                        <h2 class="modal-title" id="myModalLabel">增加读者
                                        </h2>
                                    </div>
                                    <div class="modal-body">
                                        <p style="text-align: center;"><b>请输入完整的读者信息后按确定键</b></p>
                                        <p style="text-overflow: ellipsis; white-space: nowrap; padding-left: 20px; float: left; padding-top: 0px;">读者编号：<asp:TextBox ID="TypeID" CssClass="form-control" runat="server" Style="width: 180px; padding-left: 0px; height: 30px; float: right;"></asp:TextBox></p>


                                        <p style="text-overflow: ellipsis; white-space: nowrap; padding-left: 20px; float: left; padding-top: 0px;">读者姓名：<asp:TextBox ID="TextBox3" CssClass="form-control" runat="server" Style="width: 180px; padding-left: 0px; height: 30px; float: right;"></asp:TextBox></p>
                                        <p style="text-overflow: ellipsis; white-space: nowrap; padding-left: 20px; float: left; padding-top: 0px;">初始密码：<asp:TextBox ID="TextBox4" CssClass="form-control" runat="server" Style="width: 180px; padding-left: 0px; height: 30px; float: right;"></asp:TextBox></p>
                                        
                                       
                                        <p style="text-overflow: ellipsis; white-space: nowrap; padding-left: 20px; float: left; padding-top: 0px;">班级编号：<asp:TextBox ID="TextBox5" CssClass="form-control" runat="server" Style="width: 180px; padding-left: 0px; height: 30px; float: right;"></asp:TextBox></p>

                                        <p style="text-overflow: ellipsis; white-space: nowrap; padding-left: 20px; float: left; padding-top: 0px;">读者类型：<asp:DropDownList ID="DropDownList1" CssClass="form-control" runat="server" Style="width: 180px; padding-left: 0px; height: 30px; float: right;" DataSourceID="SqlDataSource3" DataTextField="TypeName" DataValueField="readerType"></asp:DropDownList></p>
                                        <p style="text-overflow: ellipsis; white-space: nowrap; padding-left: 20px; float: left; padding-top: 0px;">手机号码：<asp:TextBox ID="TextBox7" CssClass="form-control" runat="server" Style="width: 180px; padding-left: 0px; height: 30px; float: right;"></asp:TextBox></p>
                                        <p style="text-overflow: ellipsis; white-space: nowrap; padding-left: 20px; float: left; padding-top: 0px;">邮箱号码：<asp:TextBox ID="TextBox30" CssClass="form-control" runat="server" Style="width: 180px; padding-left: 0px; height: 30px; float: right;"></asp:TextBox></p>

                                        <p style="text-overflow: ellipsis; white-space: nowrap; padding-left: 20px; float: left; padding-top: 0px;">读者生日：<asp:TextBox ID="TextBox9" CssClass="form-control" runat="server" Style="width: 180px; padding-left: 0px; height: 30px; float: right;"></asp:TextBox></p>
                                        <p style="text-overflow: ellipsis; white-space: nowrap; padding-left: 20px; float: left; padding-top: 0px;">创建日期：<asp:TextBox ID="TextBox10" CssClass="form-control" runat="server" Style="width: 180px; padding-left: 0px; height: 30px; float: right;"></asp:TextBox></p>
                         
                                        <p style="text-overflow: ellipsis; white-space: nowrap; padding-left: 20px; float: left; padding-top: 0px;">读者性别：   <asp:DropDownList ID="DropDownList2"  CssClass="form-control" runat="server" Style="width: 180px; padding-left: 0px; height: 30px; float: right;"><asp:ListItem>男</asp:ListItem><asp:ListItem>女</asp:ListItem></asp:DropDownList></p>
                                        <p style="text-overflow: ellipsis; white-space: nowrap; padding-left: 20px; float: left; padding-top: 0px;">账户余额：<asp:TextBox ID="TextBox12" CssClass="form-control" runat="server" Style="width: 180px; padding-left: 0px; height: 30px; float: right;"></asp:TextBox></p>
                                        <p style="text-overflow: ellipsis; white-space: nowrap; padding-left: 20px; float: left; padding-top: 0px;">读者备注：<asp:TextBox ID="TextBox20" CssClass="form-control" runat="server" Style="width: 460px; padding-left: 0px; height: 86px; float: right;" TextMode="MultiLine"></asp:TextBox></p>

                                        <asp:Label ID="Label1" runat="server" Text="" ForeColor="Red"></asp:Label>




                                    </div>
                                    <div class="modal-footer">
                                       

                                        <button type="button" class="btn btn-default" style="float:right;   " data-dismiss="modal">
                                            关闭
                                        </button>
                                        <asp:Button ID="sureAdd" OnClick="sureAdd_Click" CssClass="btn btn-primary" Style="height: 30px; float: right; margin-right: 20px; font-family: 'Microsoft YaHei';" runat="server" Text="确认增加" />

                                    </div>
                                </div>
                                <!-- /.modal-content -->
                            </div>
                            <!-- /.modal -->
                        </div>







                        <!-- 模态框（Modal） -->
                        <div class="modal fade" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                            <div class="modal-dialog">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                            &times;</button>
                                        <h2 class="modal-title" id="H1">修改图书
                                        </h2>
                                    </div>
                                    <div class="modal-body">
                                        <p style="text-align: center;"><b>请输入完整的图书信息后按确定键</b></p>
                                          
                                        <p style="text-overflow: ellipsis; white-space: nowrap; padding-left: 20px; float: left; padding-top: 0px;">读者编号：<asp:TextBox ID="TextBox1" CssClass="form-control" runat="server" Style="width: 180px; padding-left: 0px; height: 30px; float: right;"></asp:TextBox></p>


                                        <p style="text-overflow: ellipsis; white-space: nowrap; padding-left: 20px; float: left; padding-top: 0px;">读者姓名：<asp:TextBox ID="TextBox2" CssClass="form-control" runat="server" Style="width: 180px; padding-left: 0px; height: 30px; float: right;"></asp:TextBox></p>
                                        <p style="text-overflow: ellipsis; white-space: nowrap; padding-left: 20px; float: left; padding-top: 0px;">初始密码：<asp:TextBox ID="TextBox6" CssClass="form-control" runat="server" Style="width: 180px; padding-left: 0px; height: 30px; float: right;"></asp:TextBox></p>
                                        
                                       
                                        <p style="text-overflow: ellipsis; white-space: nowrap; padding-left: 20px; float: left; padding-top: 0px;">班级编号：<asp:TextBox ID="TextBox8" CssClass="form-control" runat="server" Style="width: 180px; padding-left: 0px; height: 30px; float: right;"></asp:TextBox></p>

                                        <p style="text-overflow: ellipsis; white-space: nowrap; padding-left: 20px; float: left; padding-top: 0px;">读者类型：<asp:DropDownList ID="DropDownList3" CssClass="form-control" runat="server" Style="width: 180px; padding-left: 0px; height: 30px; float: right;" DataSourceID="SqlDataSource3" DataTextField="TypeName" DataValueField="readerType"></asp:DropDownList></p>
                                        <p style="text-overflow: ellipsis; white-space: nowrap; padding-left: 20px; float: left; padding-top: 0px;">手机号码：<asp:TextBox ID="TextBox11" CssClass="form-control" runat="server" Style="width: 180px; padding-left: 0px; height: 30px; float: right;"></asp:TextBox></p>
                                        <p style="text-overflow: ellipsis; white-space: nowrap; padding-left: 20px; float: left; padding-top: 0px;">邮箱号码：<asp:TextBox ID="TextBox13" CssClass="form-control" runat="server" Style="width: 180px; padding-left: 0px; height: 30px; float: right;"></asp:TextBox></p>

                                        <p style="text-overflow: ellipsis; white-space: nowrap; padding-left: 20px; float: left; padding-top: 0px;">读者生日：<asp:TextBox ID="TextBox14" CssClass="form-control" runat="server" Style="width: 180px; padding-left: 0px; height: 30px; float: right;"></asp:TextBox></p>
                                        <p style="text-overflow: ellipsis; white-space: nowrap; padding-left: 20px; float: left; padding-top: 0px;">创建日期：<asp:TextBox ID="TextBox15" CssClass="form-control" runat="server" Style="width: 180px; padding-left: 0px; height: 30px; float: right;"></asp:TextBox></p>
                         
                                        <p style="text-overflow: ellipsis; white-space: nowrap; padding-left: 20px; float: left; padding-top: 0px;">读者性别：   <asp:DropDownList ID="DropDownList4"  CssClass="form-control" runat="server" Style="width: 180px; padding-left: 0px; height: 30px; float: right;"><asp:ListItem>男</asp:ListItem><asp:ListItem>女</asp:ListItem></asp:DropDownList></p>
                                        <p style="text-overflow: ellipsis; white-space: nowrap; padding-left: 20px; float: left; padding-top: 0px;">账户余额：<asp:TextBox ID="TextBox16" CssClass="form-control" runat="server" Style="width: 180px; padding-left: 0px; height: 30px; float: right;"></asp:TextBox></p>
                                        <p style="text-overflow: ellipsis; white-space: nowrap; padding-left: 20px; float: left; padding-top: 0px;">读者备注：<asp:TextBox ID="TextBox17" CssClass="form-control" runat="server" Style="width: 460px; padding-left: 0px; height: 86px; float: right;" TextMode="MultiLine"></asp:TextBox></p>

                                        <asp:Label ID="Label2" runat="server" Text="" ForeColor="Red"></asp:Label>




                                    </div>
                                    <div class="modal-footer">
                                  

                                        <button type="button" class="btn btn-default" style="height: 30px; float: right; margin-right: 20px; font-family: 'Microsoft YaHei';" runat="server" data-dismiss="modal">
                                            关闭
                                        </button>
                                        <asp:Button ID="Button4" OnClick="change_Click" CssClass="btn btn-primary" Style="height: 30px; float: right; margin-right: 20px; font-family: 'Microsoft YaHei';" runat="server" Text="确认修改" />

                                    </div>
                                </div>
                                <!-- /.modal-content -->
                            </div>
                            <!-- /.modal -->
                        </div>















                        <!--End Advanced Tables -->
                    </div>

                </div>
                <!-- /. ROW  -->



            </div>

            <!-- /. PAGE INNER  -->
        </div>
        <script>
            function loadtable() {
                $("#ContentPlaceHolder1_mybookdata tr:first").wrap("<thead></thead>");
                $("#ContentPlaceHolder1_mybookdata thead").insertBefore("#GriView1 tbody");
                $("#ContentPlaceHolder1_mybookdata").dataTable();
            };
        </script>

</asp:Content>

